Portable electronic devices are being used for increasingly diversified purposes. Typical examples of these devices are mobile phones and computers. The devices carry large amounts of data about the user, and they provide the user with access to various information channels. However, up to the present, the state associated with the movement of the device, or changes in the state, have not been utilized to any larger extent, although they would allow to recognize the user's activity context, which depends on the user's activities related to work or spare time, such as negotiations, travel or leisure activities.
One way of measuring the movement of a mobile device or to determine the user's activity context is to use one or more accelerometers to measure the accelerations of the device in one or more directions. Accelerations parallel to different dimensions vary according to activity context and they are characteristic of each activity context. In principle, it is therefore possible to identify activity contexts on the basis of the acceleration or movement data parallel to the different dimensions. For example, it is possible to try to identify whether the user is walking, running, walking up the stairs, etc. However, a problem involved in this is that the accelerometer signals change when the position of the device changes and therefore it is not possible to know the structural directions of the device to which the accelerations are really acting on. For example, it is not possible to measure the direction of gravity in relation to the axes parallel to the device's structures and, therefore, measurements cannot be used for determining whether the device is in an even approximately correct position, or upside down.
An attempt to solve this problem has been to attach the device always in the same position to the user. This does not, however, solve the problem, but complicates the use of the device. In addition, changes in the user's pose affect the position of the device and thereby change the directions of the accelerations, which makes it more difficult to recognise the direction of gravity in relation to the device.